package com.fh.web.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fh.modules.ucas.entity.SysUserRole;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author Qiu,Junda
 * @date 2019年4月3日
 * @description 用户角色表 Mapper 接口
 */
@Mapper
public interface SysUserRoleMapper extends BaseMapper<SysUserRole> {

	@Select("select role_code from sys_role where id in (select role_id from sys_user_role where user_id = #{userId})")
	List<String> getRoleByUserName(@Param("userId") String userId);
}
